﻿
<%@ Page language="c#" Inherits="Mysoft.Crm.Web.Tools.SetDefaultView" CodeBehind="Mysoft.Crm.Application.Pages.Tools.dll" %>
<%@ Register TagPrefix="frm" Namespace="Mysoft.Crm.Application.Forms" Assembly="Mysoft.Crm.Application.Components" %>
<%@ Register TagPrefix="cnt" Namespace="Mysoft.Crm.Application.Controls" Assembly="Mysoft.Crm.Application.Components" %>
<%@ Import Namespace="Mysoft.Crm" %>
<html>
<head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312"/>
<title>默认视图选择</title>

<link rel="stylesheet" type="text/css" href="/_forms/styles/form.css">
<link rel="stylesheet" type="text/css" href="/_common/styles/dialogs.css">
<script language="javascript" src="/_controls/settings.aspx"></script>
<script language="javascript" src="/_forms/addrelated.js"></script>
<script language="javascript" src="/_controls/util/util.js"></script>
<script language="javascript" src="/_controls/number/number.js"></script>
<link rel="stylesheet" type="text/css" href="/_common/styles/select.css">
<link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
<script language="javascript" src="/_controls/util/util.js"></script>
<script language="javascript" src="/_common/scripts/global.js"></script>

<cnt:AppHeader runat="server" id="crmHeader"/>

<script language="javascript">

	var _sDefaultViewId = "<%=defaultView%>";
	var _sGuid;

	function handleView(o)
	{
		butBegin.disabled = false;
		_sGuid = o.returnValue;
	}

	function applychanges()
	{
		if (_sDefaultViewId != _sGuid)
		{
			var oXml = new ActiveXObject("Microsoft.XMLDOM");
				oXml.async = false;
				oXml.load("/tools/ViewEditor/cmds/cmd_setdefaultview.aspx?newId=" + _sGuid + "&oldId=" + _sDefaultViewId);
				
			window.returnValue = _sGuid;
			
			handleXMLErr(oXml);
		}
		
		window.close();
	}

	function cancel()
	{
		window.close();
	}
	
	function window.onload()
	{
		window.returnValue = _sDefaultViewId;
	}
	
</script>

</head>

<body>
	<frm:DialogForm id="crmForm" runat="server">

		<!-The default view is the view that will appear when a user opens the->默认视图是当用户打开<%=Util.GetFmtObjName(CurrentType, Util.NameFormatStyle.Singular)%>列表页将看到的视图，选择一个对大多数用户最有用的视图。<!- list page. Choose a view that will be the most useful to the largest number of users.->
		
		<br><br>
		
		<table cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td>
					<cnt:AppViewSelector PublicViewsOnly="true" runat="server" id="crmViewSelector"/>
				</td>
			</tr>
		</table>

	</frm:DialogForm>
</body>
</html>